home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Headers / misckit / MiscTargetActionView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-27  |  2.4 KB  |  80 lines

  1. /*=========================== TargetActionView.h ============================*/
  2. //        Written by Dale Amon, copyright 1994 by Genesis Project, Ltd.
  3. //                Version 0.8.  All rights reserved.
  4. //
  5. //        This notice may not be removed from this source code.
  6. //
  7. //    This object is included in the MiscKit by permission from the author
  8. //    and its use is governed by the MiscKit license, found in the file
  9. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  10. //    for a list of all applicable permissions and restrictions.
  11. //    
  12.  
  13. /* Abstract superclass that impliments a target action paradeigm for Views.
  14.    This is not quite the same as the Control Class because there is no 
  15.    "value". It allows the view to accept keyboard and mouse events and convert
  16.    them into target/action messages (potentially using a responder chain).
  17.    Note that events in the actionMask will only be recieved if the
  18.    corresponding events are enabled in the window's event mask.
  19.  
  20. HISTORY
  21. 1-Aug-93   Dale Amon at GPL
  22.        Created.
  23.  
  24. */
  25.  
  26. #define    MISC_TAVIEW_VERSION_ID    0.8
  27.  
  28. @interface MiscTargetActionView:View
  29. {    BOOL    firstMouse;        /* set if view is to respond to
  30.                        a first mouse down */
  31.     int    actionMask;        /* events that will trigger
  32.                        the target/action */
  33.     NXEvent *actionEvent;        /* event which caused the current
  34.                        firing of a target/action */
  35.     id    target;            /* target for events */
  36.     SEL    action;            /* action to be sent upon event */
  37.  
  38.     BOOL    debug;            /* debug trace flag */
  39. }
  40.  
  41. + initialize;
  42.  
  43. - initFrame:            (const NXRect *) theRect;
  44.  
  45. - (BOOL)acceptsFirstResponder;
  46. - (BOOL)acceptsFirstMouse;
  47.  
  48. - setFirstResponder;
  49. - setFirstMouse:        (BOOL) flg;
  50.  
  51. - (int)addToActionMask:        (int)newActions;
  52. - (int)actionMask;
  53. - (int)removeFromActionMask:    (int)oldActions;
  54. - (int)setActionMask:        (int)newMask;
  55.  
  56. - setAction:            (SEL) theAction;
  57. - setTarget:            theTarget;
  58. - (SEL) action;
  59. - target;
  60. - (const NXEvent *) actionEvent;
  61.  
  62. - flagsChanged:            (NXEvent *)theEvent;
  63. - keyDown:            (NXEvent *)theEvent;
  64. - keyUp:            (NXEvent *)theEvent;
  65. - mouseDown:            (NXEvent *)theEvent;
  66. - mouseDragged:            (NXEvent *)theEvent;
  67. - mouseEntered:            (NXEvent *)theEvent;
  68. - mouseExited:            (NXEvent *)theEvent;
  69. - mouseMoved:            (NXEvent *)theEvent;
  70. - mouseUp:            (NXEvent *)theEvent;
  71. - rightMouseDown:        (NXEvent *)theEvent;
  72. - rightMouseDragged:        (NXEvent *)theEvent;
  73. - rightMouseUp:            (NXEvent *)theEvent;
  74.  
  75. - setDebug:            (BOOL) flg;
  76. - (BOOL) debug;
  77. - toggleDebug:            sender;
  78.  
  79. @end
  80.